package net.mfjassociates.financial.expense.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import net.mfjassociates.financial.expense.client.managed.request.CategoryProxy;

public class CategoryProxyRenderer extends ProxyRenderer<CategoryProxy> {

    private static net.mfjassociates.financial.expense.client.managed.ui.CategoryProxyRenderer INSTANCE;

    protected CategoryProxyRenderer() {
        super(new String[] { "description" });
    }

    public static net.mfjassociates.financial.expense.client.managed.ui.CategoryProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new CategoryProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(CategoryProxy object) {
        if (object == null) {
            return "";
        }
        return object.getDescription() + " (" + object.getId() + ")";
    }
}
